//
//  ideabooks.m
//  PerfectWorld
//
//  Created by dllo on 16/9/20.
//  Copyright © 2016年 LST. All rights reserved.
//

#import "ideabooks.h"
#import "IdeaPhotos.h"
#import "SonUser.h"

@implementation ideabooks
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"User"]) {
        _user = [SonUser modelWithDic:value];
    }
    if ([key isEqualToString:@"photos"]) {
        NSMutableArray<IdeaPhotos *> *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            IdeaPhotos * photos = [IdeaPhotos modelWithDic:dic];
            [array addObject:photos];
        }
        _photos = array;
    }
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"description"]) {
        _I_description = value;
    }
    if ([key isEqualToString:@"id"]) {
        _Idea_id = value;
        
    }
}


@end
